package com.celesea.workflow.core.service;

import com.celesea.framework.authority.User;
import com.celesea.framework.service.BaseService;
import com.celesea.workflow.core.entity.Workflow;
import com.celesea.workflow.core.entity.WorkflowNode;
import com.celesea.workflow.core.entity.WorkflowNodePermission;

import java.util.List;

/**
 * @author JackYuan
 * @create 2017-11-28 12:52
 */
public interface WorkflowNodePermissionService extends BaseService<WorkflowNodePermission> {

    int doDeleteByDefine(String id);

    List<WorkflowNodePermission> selectByNode(WorkflowNode node);

    /**
     * 解析出权限对应的用户
     * @param item
     * @param entity
     * @return
     */
    List<User> parsePermissionUser(WorkflowNodePermission item, Workflow entity);
}
